<template>
    <div class="tabtitles clear">
        <h2>{{name}}</h2>
        <div v-if="!addbtn" class="backmem" @click="tomember"><img :src="rr">返回企业中心</div>
        <div v-if="addbtn" class="backmem" @click="add" style=" text-align: center; background: #20a2b2; color: #fff;"><i class="el-icon-plus"></i> 新增职位 </div>
    </div>
</template>
<script type="text/babel">
// @ is an alias to /src
import {} from '../assets/js/domains'
import rr from '../assets/img/rr.png'
export default {
  name: 'Companytitle',
  components: {},
  data: function () {
    return {
      rr: rr
    }
  },
  props: {
    addbtn: {
      default: false
    },
    name: {
      default: '基本信息'
    }
  },
  computed: {},
  created: function () {
  },
  mounted: function () {
  },
  methods: {
    add: function () {
      this.$emit('addform')
    },
    tomember: function () {
      window.location.href = 'companyCenter.html'
    }
  }
}
</script>
<style lang="less">
    .tabtitles{
        padding-bottom: 15px;
        h2{
            font-size: 22px;
            float: left;
            line-height: 40px;
        }
        .backmem{
            float: right;
            width: 180px;
            height: 40px;
            border: 2px solid #20a2b2;
            border-radius: 6px;
            font-size: 18px;
            line-height: 38px;
            color: #20a2b2;
            img{
                height: 18px;
                float: left;
                margin: 9px 6px 0 23px ;
            }
        }
    }
</style>
